﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

//using PowerCreator.LMS.Logic.Common;
//using PowerCreator.LMS.Model.Entity;
//using PowerCreator.LMS.Logic.PaperManager;
//using PowerCreator.LMS.Logic.QuestionManager;

using System.Drawing;
using WebChart;
using PowerCreator.LMS.Common.Script;

public partial class sysadmin_CountManager_QuestionPassCount : PowerCreator.LMS.Web.Base.BasePage
{
    //ManagerPaperUserAnswer objPaperUserAnswerLogic = new ManagerPaperUserAnswer();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //ViewState["QuestionID"] = Base64.Decode(Request.QueryString["q"].ToString());
            ////ViewState["PaperName"] = Base64.Decode(Request.QueryString["pn"].ToString());
            //BandChart(int.Parse(ViewState["QuestionID"].ToString()));

        }
    }

    private void BandChart(int questionID)
    {
        //DataTable dt = new DataTable();
        //string search = " and qf.QuestionID=" + questionID.ToString();
        //dt = objPaperUserAnswerLogic.QuestionCountList(search, 1, 1);
        //int PassCount = int.Parse(dt.Rows[0]["RightCount"].ToString());
        //int UserSumCount = int.Parse(dt.Rows[0]["Usercount"].ToString());
        //int UnPassCount = UserSumCount - PassCount;

        //lab_pass.Text = "正确人数：" + PassCount.ToString();
        //lab_UnPass.Text = "错误人数：" + UnPassCount.ToString();
        //lab_UserCount.Text = UserSumCount.ToString();

        //ChartPointCollection data = new ChartPointCollection();

        //data.Add(new ChartPoint("Ene", PassCount));
        //data.Add(new ChartPoint("Feb", UnPassCount));


        //PieChart c = new PieChart(data, Color.Brown);
        //c.Colors = new Color[] { Color.Red, Color.Blue };
        //chart1.ChartTitle.Text = "答题通过率";
        //chart1.Charts.Add(c);
        //chart1.RedrawChart();

    }
    protected void btnPrinter_Click(object sender, EventArgs e)
    {
        Script.RedirectURL("QuestionInfo.aspx");
    }
}
